1. Field of the Invention
The present invention relates to a multifunction printer having a copy function and a scan function capable of transferring read image data to a connected host apparatus, and an image processing method.
2. Description of the Related Art
FIG. 5 is a block diagram showing the arrangement of a conventional multifunction printer (to be referred to as an MFP hereinafter) having a copy function and a scan function.
Referring to FIG. 5, a control chip 10 controls the entire apparatus. Each of blocks 100 to 1200 to be described below is integrated in a single chip. A scanner I/F 100 receives, from the outside of the control chip 10, image data of each line A/D-converted by an AFE 2400 and writes the image data in a main memory 2000 by using a DMAC 110.
A scanner image processing unit 200 reads out image data from the main memory 2000 by using a DMAC 210, executes predetermined image processing such as edge enhancement and γ-conversion, and writes the process result in the main memory 2000 again by using the DMAC 210.
A printer image processing unit 300 is a block that converts image data processed by the scanner image processing unit 200 into a CMYK (density) data for printer output. The printer image processing unit 300 writes and reads to/from the main memory 2000 by using a DMAC 310.
A printer I/F 400 is an interface circuit that transmits CMYK data, that is the process result of the printer image processing unit 300, to a printer 2100. The printer I/F 400 reads from the main memory 2000 by using a DMAC 410.
The scanner I/F 100, scanner image processing unit 200, printer image processing unit 300, and printer I/F 400 connect to a common image bus 1100 via the DMACs 110, 210, 310, and 410, respectively.
A memory control unit 500 executes arbitration and interface control between the main memory 2000, and the image bus 1100 or a control bus 1200.
A CPU 600 controls the entire apparatus.
A motor controller 700 controls the motor of the scanner or printer.
A panel I/F 800 executes interface control to an operation unit 2500.
An SIO 900 executes interface control to a ROM 2600.
A USB device I/F 1000 executes a communication process with a host apparatus (PC) connected to the MFP.
The CPU 600, motor controller 700, panel I/F 800, SIO 900, and USB device I/F 1000 connect to the common control bus 1200.
The main memory 2000 is used by the CPU 600 or each process block as a work memory. The printer 2100 outputs image data to a printing medium such as a printing paper sheet. An image reading processing unit 2300 uses an optical device such as a CCD or CIS. The AFE 2400 A/D-converts image data that is line-sequentially output from the image reading processing unit 2300 as analog data and outputs the converted image data to the scanner I/F 100 of the control chip 10 as image data of each line.
The operation unit 2500 includes an LCD to output various kinds of information to the user of the MFP and keys to be directly operated by the user, and inputs/outputs information to/from the control chip 10 via the panel I/F 800. The ROM 2600 stores the operation program of the CPU 600.
FIG. 6 is a block diagram showing the detailed arrangement in the scanner image processing unit 200.
Referring to FIG. 6, a shading processing unit 201 corrects the sensitivity fluctuation between the pixels of the CCD and CIS. A γ-conversion processing unit 202 converts the gradation characteristic of image data that has undergone the shading process. A character determination processing unit 203 checks the pixel values of n×n pixels with a given central pixel and determines whether or not they are part of a character image. A filter processing unit 204 executes edge enhancement and moire suppression by filter calculation based on the pixel values of m×m pixels with a given central pixel.
The shading processing unit 201, character determination processing unit 203, and filter processing unit 204 have a dedicated shading (SHD) buffer 201a, and dedicated line buffers 203a and 204a to store shading data or image data of a plurality of lines, respectively. Image data or shading data stored in the main memory 2000 is read out in the main scanning direction (the moving direction of the CCD or CIS) in correspondence with a plurality of lines, stored in the line buffers, and individually processed.
For example, Japanese Patent Publication Laid-Open No. 7-170372 discloses a prior art apparatus with the above-described conventional arrangement.
The arrangement disclosed in Japanese Patent Publication Laid-Open No. 7-170372 requires a very large capacity line memory because each image processing block in the image processing unit must have a line memory necessary for the image processing. For example, a line memory corresponding to four lines of an original width is necessary for a 5×5 pixel filter process. If an input image is an A4 color image having a resolution of 600 dpi (=5000 pixel/line) and 16 bits per pixel, the control chip 10 must incorporate a large capacity memory of 120 kB. Additionally, the memory size needs to be proportional to the resolution of input image data and the actual original size in the widthwise direction.
To solve this problem, Japanese Patent Publication Laid-Open No. 2004-220584 proposes a new image processing system.
According to Japanese Patent Publication Laid-Open No. 2004-220584, image data output from the reading control unit and line-sequentially stored in the main memory is read out in correspondence with each rectangle including a “margin” necessary for image processing, as shown in FIG. 7. In addition, light/dark shading data at the position corresponding to the rectangle is read out from the main memory simultaneously. The image processing unit executes various kinds of image processing such as a shading process and writes the process result in the main memory in correspondence with each rectangle again.
This process allows each image processing unit to have a line memory corresponding to not the original width but only the width of the rectangle. It is therefore possible to greatly reduce the total size of the line memories of the image processing units. If input image data has a higher resolution, or the input image size itself increases from, e.g., A4 to A3, it is necessary to merely increase the number of times of rectangle readout from the main memory. Hence, it is easy to cope with even an increase in the resolution or size of an image. The “margin” here indicates an area that must be read out from the main memory as an additional area outside the input rectangle to execute image processing for the whole input rectangle. For example, to perform a 5×5 pixel filter process, two extra lines must be read out on each of the upper, lower, left, and right sides of an input rectangle.
However, the method disclosed in Japanese Patent Publication Laid-Open No. 2004-220584 still has a problem.
In this method, the image processing unit cannot start the process before the scanner I/F outputs image data corresponding to the longitudinal size of the rectangle to the main memory. Hence, the main memory must have a capacity to store at least the longitudinal size of the rectangle of image data of one line.
This problem is solved by simply reducing the longitudinal size of the rectangle, as a matter of course. In this case, however, the “margin” added to the rectangle read out from the main memory and shading data necessary for the shading process of the rectangle suffer a great influence. When the longitudinal size of the rectangle corresponds to n lines, the 5×5 pixel filter process requires a margin corresponding to a total of four lines on the upper and lower sides and shading data corresponding to two lines (light/dark). It is therefore necessary to read out data corresponding to (n+6) lines from the main memory. This means that, as n becomes smaller, the necessary data amount to be read out from the main memory increases relatively. This requires a wide data access band between the control chip 10 and the main memory 2000.
The memory necessary for using the scanner function of the MFP has been described above. An MFP having a copy function requires a memory for both the scanner and print functions. FIG. 8 shows the data flow in the MFP in this case.
In the copy mode, image data read by the image reading processing unit 2300 and A/D-converted by the AFE 2400 is temporarily written in buffer 1 in the main memory 2000 line-sequentially. The scanner image processing unit 200 reads out the image data from buffer 1 together with shading data corresponding to a rectangle including a margin, executes various kinds of image processing, and writes the processed image data in buffer 2 in the main memory. The printer image processing unit 300 line-sequentially reads out the image data from buffer 2, converts the image data into CMYK binary data processible by the printer 2100, and writes the data in buffer 3 in the main memory 2000. The printer I/F 400 reads out the CMYK binary data written in buffer 3, outputs the data to the printer 2100, and prints it on an output paper sheet.
In the scan mode, the data flow up to the scanner image processing unit 200 is the same as described above. The data output from the scanner image processing unit 200 is stored not in buffer 2 but in the transmission buffer to the USB device I/F 1000 and transmitted to the PC via the USB. Buffers 2 and 3 are unnecessary. Since the size of the transmission buffer is smaller than that of buffer 2 or 3, the required total size of the buffer memory is smaller than in the copy mode.
As described above, in the copy mode, all of the scanner I/F, scanner image processing unit, printer image processing unit, and printer I/F in the MFP access the main memory. To do this, the main memory must incorporate buffers 1 to 3 to buffer the process speed difference between the process blocks. Additionally, a very wide data access band is necessary between the control chip and the main memory.
As summarized, the method proposed in Japanese Patent Publication Laid-Open No. 2004-220584 has the following problems.
(1) The buffer memory (buffer 1 in FIG. 8) between the scanner I/F and the scanner image processing unit must have a relatively large capacity.
(2) In the copy mode, the main memory requires a buffer memory (buffer 1+buffer 2+buffer 3 in FIG. 8) with a large capacity, and a wide data access band is necessary between the control chip and the main memory.